#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QFormLayout>
#include <QMessageBox>
#include <QSqlQuery>

class Login : public QWidget
{
    Q_OBJECT

public:
    explicit Login(QWidget *parent = nullptr);

private slots:
    void onDoctorLogin();
    void onPatientLogin();

private:
    QLineEdit *usernameInput;  // 用户名输入框
    QLineEdit *passwordInput;  // 密码输入框

    bool validateCredentials(const QString &username, const QString &password, const QString &userType);  // 验证登录信息
};

#endif // LOGIN_H
